package cn.wolfcode.shop.cloud.service;

import cn.wolfcode.shop.cloud.vo.SeckillGoodVo;
import domain.SeckillGood;

import java.util.List;

public interface ISeckillGoodService {

    List<SeckillGoodVo> query();

    //返回一个seckillGoodVo对象
    SeckillGoodVo queryById(Long seckillId);

    /**
     * 减少库存
     * @param seckillId
     */
    int decr(Long seckillId);

    SeckillGoodVo queryByIdCache(Long seckillId);

    List<SeckillGoodVo> queryCache();
    //回补真实库存
    void incrCount(Long seckillId);
    //回补预库存
    void syncPreCount(Long goodId);
}
